{include "header.tpl"}

{*<link href="/css/bootstrap-switch.min.css" rel="stylesheet" media="screen">
<script src="/js/bootstrap-switch.min.js"></script>
<link rel="stylesheet" href="/css/skins/square/blue.css"/>
<script src="/js/icheck.min.js"></script>*}

<form id="domainForm" rel="ajax" method="post" action="/Shop/modify" enctype="multipart/form-data" class="form-horizontal" role="form" onsubmit="domainSubmit()">

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">连锁店名称:</label>
        <div class="col-sm-5">
            <input type="text" id="name" name="name" value="{$data.name}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">门店图片(必传)：</label>
        <div class="col-sm-5">
            {if $data.shop_img neq ""}<img style="width: 100px;height: 100px;" src="{$oss_url}{$data.shop_img}">{/if}
            <input type="file" id="shop_img" name="shop_img">
            <input style="display: none" type="text" id="shop_img_t" name="shop_img_t" value="{$data.shop_img}" class="form-control" />
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">店长名字:</label>
        <div class="col-sm-5">
            <input type="text" id="manager" name="manager" value="{$data.manager}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">营业开门时间:</label>
        <div class="col-sm-5">
            <input type="text" id="start_work_time" name="start_work_time" value="{$data.start_work_time}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">打烊时间:</label>
        <div class="col-sm-5">
            <input type="text" id="stop_work_time" name="stop_work_time" value="{$data.stop_work_time}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">打烊状态:</label>
        <div class="col-sm-5">
            <select name="work_status" class="form-control" >
                <option value="">--请选择打烊状态--</option>
                {foreach $workStatus as $key => $value}
                    <option value="{$key}" {if $data.work_status eq $key}selected="selected"{/if}>{$value}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">属组:</label>
        <div class="col-sm-5">
            <select name="gid" class="form-control" >
                <option value="">--请选择属组--</option>
                {foreach $mList as $key => $value}
                    <option value="{$value['id']}" {if $data.gid eq $value['id']}selected="selected"{/if}>{$value['title']}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">起送金额:</label>
        <div class="col-sm-5">
            <input type="text" id="money" name="money" value="{$data.money}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">地址:</label>
        <div class="col-sm-5">
            <input type="text" id="address" name="address" value="{$data.address}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">手机:</label>
        <div class="col-sm-5">
            <input type="text" id="phone" name="phone" value="{$data.phone}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">所在市:</label>
        <div class="col-sm-5">
            <input type="text" id="city" name="city" value="{$data.city}" class="form-control" required/>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">经度:</label>
        <div class="col-sm-5">
            <input type="text" id="x" name="x" value="{$data.x}" class="form-control" required/>
            <a href="/Shop/bd" target="_blank">获取经纬度</a>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">纬度:</label>
        <div class="col-sm-5">
            <input type="text" id="y" name="y" value="{$data.y}" class="form-control" required/>
            <a href="/Shop/bd" target="_blank">获取经纬度</a>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">状态:</label>
        <div class="col-sm-5">
            <label><input type="radio" value="1" name="status" {if $data.status eq 1} checked{/if}> 正常</label>
            <label><input type="radio" value="2" name="status" {if $data.status eq 2} checked{/if}> 禁用</label>
            <label><input type="radio" value="-1" name="status" {if $data.status eq -1} checked{/if}> 删除</label>
        </div>
    </div>

    <div class="form-group form-group-sm">
        <label for="" class="col-sm-3 control-label">&nbsp;</label>
        <div class="col-sm-3">
            <input type="hidden" name="id" value="{$smarty.get.id}"/>
            <button type="submit" class="btn btn-primary">提交</button>
        </div>
    </div>
</form>

<script type="text/javascript">


</script>
{include "footer.tpl"}